<template>
    <div>
      <!-- 选项卡 -->

      <ul>
        <li @click='clickLi1'>1</li>
        <li @click='clickLi2'>2</li>
        <li @click='clickLi3'>3</li>
      </ul>
     <div class="div">
        <ol>
        <li  :class="{mynone : li1 === false}">1</li>
        <li :class="{mynone : li2 === false}">2</li>
        <li :class="{mynone : li3 === false}">3</li>
        </ol>
     </div>

    </div>
</template>

<script>
export default {
    name: 'Home',
    data() {
        return {
          li1:false,
          li3:true,
          li2:true,
        };
    },
    created() {
    },
    methods: {
      clickLi1() {
        console.log('li1');
        this.li1 = false
        this.li2 = true
        this.li3 = true
        
      },
      clickLi2() {
        console.log('li2');
        this.li2 = false
         this.li1 = true
        this.li3 = true

      },
      clickLi3() {
        console.log('li3');
        this.li3 = false
         this.li2 = true
        this.li1 = true

      }
    },
    //组件挂载
    components: {},
    //计算属性
    computed: {},
    //过滤器
    filters: {},
};
</script>

<style lang="scss" scoped>
*{
  padding: 0;
  margin: 0;
}
ul{
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;

}
.div{
    width:360px ;
    height: 370px;
    border: darkorchid 1px solid;
    overflow: hidden;
}
ol{
  width: 1089px;
  height: 100%;
  list-style: none;
text-align: center;
  li{
    width: 160px;
    height: 370px;
    float: left;
    background-color: darkorange;
    border: darkorchid 1px solid;
   
  }
   .mynone{
      background-color: darkturquoise;
    }
}
</style>
